home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’95 / Closure / Sources / GX Headers / graphics libraries.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-24  |  21.1 KB  |  576 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        graphics libraries.h
  3.  
  4.     Copyright:    © 1984-1994 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef graphicsLibrariesIncludes
  13. #define graphicsLibrariesIncludes
  14.  
  15. #ifndef powerc
  16.  #pragma pointers_in_D0                            
  17. #endif
  18.  
  19.     #ifndef graphicsRoutinesIncludes
  20. #include "graphics routines.h"
  21. /*    #include "graphics types.h"                                    */
  22. /*        #include "math types.h"                                    */
  23. /*            #include <Types.h>                                    */
  24. /*                #include <ConditionalMacros.h>                    */
  25. /*                #include <MixedMode.h>                            */
  26. /*                    #include <Traps.h>                            */
  27. /*    #include "graphics errors.h"                                */
  28. /*    #include "font types.h"                                        */
  29. /*    #include "graphics linkage.h"                                */
  30.     #endif
  31.  
  32.     #ifndef mathRoutinesIncludes
  33. #include "math routines.h"
  34. /*    #include <FixMath.h>                                        */
  35.     #endif
  36.     
  37. #ifndef powerc
  38.  #pragma pointers_in_A0                            
  39. #endif
  40.  
  41.     #ifdef __cplusplus
  42. extern "C" {
  43.     #endif
  44.  
  45. #define NilShapeReturn(a) if ((a) == (gxShape) nil) {GXPostGraphicsError(shape_is_nil); return; } else
  46.  
  47. #define NilShapeReturnNil(a) if ((a) == (gxShape) nil) {GXPostGraphicsError(shape_is_nil); return 0L; } else
  48.  
  49. #define NilStyleReturn(a) if ((a) == (gxStyle) nil) {GXPostGraphicsError(style_is_nil); return; } else
  50.  
  51. #define NilStyleReturnNil(a) if ((a) == (gxStyle) nil) {GXPostGraphicsError(style_is_nil); return 0L; } else
  52.  
  53. #define NilInkReturn(a) if ((a) == (gxInk) nil) {GXPostGraphicsError(ink_is_nil); return; } else
  54.  
  55. #define NilInkReturnNil(a) if ((a) == (gxInk) nil) {GXPostGraphicsError(ink_is_nil); return 0L; } else
  56.  
  57. #define NilTransformReturn(a) if ((a) == (gxTransform) nil) {GXPostGraphicsError(transform_is_nil); return; } else
  58.  
  59. #define NilTransformReturnNil(a) if ((a) == (gxTransform) nil) {GXPostGraphicsError(transform_is_nil); return 0L; } else
  60.  
  61. #define NilColorSetReturn(a) if ((a) == (gxColorSet) nil) {GXPostGraphicsError(colorSet_is_nil); return; } else
  62.  
  63. #define NilColorSetReturnNil(a) if ((a) == (gxColorSet) nil) {GXPostGraphicsError(colorSet_is_nil); return 0L; } else
  64.  
  65. #define NilColorProfileReturn(a) if ((a) == (gxColorProfile) nil) {GXPostGraphicsError(colorProfile_is_nil); return; } else
  66.  
  67. #define NilColorProfileReturnNil(a) if ((a) == (gxColorProfile) nil) {GXPostGraphicsError(colorProfile_is_nil); return 0L; } else
  68.  
  69. #define NilTagReturn(a) if ((a) == (gxTag) nil) {GXPostGraphicsError(tag_is_nil); return; } else
  70.  
  71. #define NilTagReturnNil(a) if ((a) == (gxTag) nil) {GXPostGraphicsError(tag_is_nil); return 0L; } else
  72.  
  73.     #ifdef debugging
  74.         #undef DebugStr
  75.         #undef IfDebug
  76. #define IfDebug(a, b) if (a) DebugStr(b); else
  77.  
  78. #define IfDebugReturn(a, b) if (a) { DebugStr(b); return; } else
  79.  
  80. #define IfDebugReturnNil(a, b) if (a) { DebugStr(b); return 0L; } else
  81.  
  82. #define NilParamReturn(a) if ((a) == 0L) {GXPostGraphicsError(parameter_is_nil); return; } else
  83.  
  84. #define NilParamReturnNil(a) if ((a) == 0L) {GXPostGraphicsError(parameter_is_nil); return 0L; } else
  85.  
  86. #define IfErrorReturn(a, b) if (a) { GXPostGraphicsError(b); return; } else
  87.  
  88. #define IfErrorReturnNil(a, b) if (a) { GXPostGraphicsError(b); return 0L; } else
  89.  
  90. #define IfNotice(a, b) if (a) GXPostGraphicsNotice(b); else
  91.  
  92. #define IfWarning(a, b) if (a) GXPostGraphicsWarning(b); else
  93.  
  94. #define IfWarningReturn(a, b) if (a) { GXPostGraphicsWarning(b); return; } else
  95.  
  96. #define IfWarningReturnNil(a, b) if (a) { GXPostGraphicsWarning(b); return 0L; } else
  97.  
  98.     #else
  99. #define IfDebug(a, b)
  100.  
  101. #define IfDebugReturn(a, b)
  102.  
  103. #define IfDebugReturnNil(a, b)
  104.  
  105. #define NilParamReturn(a)
  106.  
  107. #define NilParamReturnNil(a)
  108.  
  109. #define IfErrorReturn(a, b)
  110.  
  111. #define IfErrorReturnNil(a, b)
  112.  
  113. #define IfNotice(a, b)
  114.  
  115. #define IfWarning(a, b)
  116.  
  117. #define IfWarningReturn(a, b) if (a) return; else
  118.  
  119. #define IfWarningReturnNil(a, b) if (a) return 0L; else
  120.  
  121.     #endif
  122.  
  123.     #ifndef __QUICKDRAW__
  124.     #endif
  125.  
  126. enum commonColors {
  127.     gxWhite                        = 1,
  128.     gxBlack,
  129.     gxGray,
  130.     gxGrey                        = gxGray,
  131.     white                        = 1,
  132.     black,
  133.     gray,
  134.     grey                        = gray,
  135.     red,
  136.     green,
  137.     blue,
  138.     cyan,
  139.     magenta,
  140.     yellow,
  141.     orange,
  142.     chartreuse,
  143.     aqua,
  144.     teal                        = aqua,
  145.     slate,
  146.     purple,
  147.     violet                        = purple,
  148.     maroon,
  149.     brown,
  150.     pink,
  151.     turquoise,
  152.     cadmium_lemon,
  153.     cadmium_light_yellow,
  154.     aureoline_yellow,
  155.     naples_deep_yellow,
  156.     cadmium_yellow,
  157.     cadmium_deep_yellow,
  158.     cadmium_orange,
  159.     cadmium_light_red,
  160.     cadmium_deep_red,
  161.     geranium_lake,
  162.     alizarin_crimson,
  163.     rose_madder,
  164.     madder_deep_lake,
  165.     brown_madder,
  166.     permanent_red_violet,
  167.     cobalt_deep_violet,
  168.     ultramarine_violet,
  169.     ultramarine_blue,
  170.     cobalt_blue,
  171.     royal_blue,
  172.     cerulean_blue,
  173.     manganese_blue,
  174.     indigo,
  175.     turquoise_blue,
  176.     emerald_green,
  177.     permanent_green,
  178.     viridian_light,
  179.     cobalt_green,
  180.     cinnabar_green,
  181.     sap_green,
  182.     chromium_oxide_green,
  183.     terre_verte,
  184.     yellow_ochre,
  185.     mars_yellow,
  186.     raw_sienna,
  187.     mars_orange,
  188.     gold_ochre,
  189.     brown_ochre,
  190.     deep_ochre,
  191.     burnt_umber,
  192.     burnt_sienna,
  193.     flesh,
  194.     flesh_ochre,
  195.     english_red,
  196.     venetian_red,
  197.     indian_red,
  198.     raw_umber,
  199.     greenish_umber,
  200.     van_dyck_brown,
  201.     sepia,
  202.     warm_grey,
  203.     cold_grey,
  204.     ivory_black,
  205.     lamp_black,
  206.     titanium_white,
  207.     zinc_white,
  208.     pale_gold,
  209.     gold,
  210.     old_gold,
  211.     pink_gold,
  212.     white_gold,
  213.     yellow_gold,
  214.     green_gold,
  215.     platinum,
  216.     silver,
  217.     antique_silver,
  218.     chrome,
  219.     steel,
  220.     copper,
  221.     antique_copper,
  222.     oxidized_copper,
  223.     bronze,
  224.     brass,
  225.     iron,
  226.     rusted_iron,
  227.     lead,
  228.     fluorescent_pink,
  229.     fluorescent_green,
  230.     fluorescent_blue,
  231.     incadescent_high,
  232.     incadescent_low,
  233.     moonlight,
  234.     sodium,
  235.     daylight,
  236.     dawn,
  237.     afternoon,
  238.     dusk,
  239.     mauve,
  240.     apple_green,
  241.     apple_yellow,
  242.     apple_orange,
  243.     apple_red,
  244.     apple_purple,
  245.     apple_blue,
  246.     light                        = 512,
  247.     dark                        = 1024,
  248.     warm                        = 2048,
  249.     reddish                        = warm,
  250.     cool                        = 4096,
  251.     bluish                        = cool,
  252.     grayish                        = 8192,
  253.     whitish                        = light,
  254.     blackish                    = dark,
  255.     greenish                    = 16384
  256. };
  257.  
  258. typedef long commonColor;
  259.  
  260. extern gxColorSet commonColorSet;
  261.  
  262. extern gxSetColor commonColorList[];
  263.  
  264. extern short commonColorCount;
  265.  
  266. #define makeRGBSHORT(a, b, c) ((c >> 14) + ((b >> 13) + (a >> 13) << 3) << 3)
  267.  
  268. #define makeCMYKSHORT(a, b, c, d) ((d >> 14) + ((c >> 14) + ((b >> 14) + (a >> 14) << 2) << 2) << 2)
  269.  
  270. #define makeRGB16(a, b, c) ((c >> 11) + ((b >> 11) + (a >> 11) << 5) << 5)
  271.  
  272. #define makeCMYK16(a, b, c, d) ((d >> 12) + ((c >> 12) + ((b >> 12) + (a >> 12) << 4) << 4) << 4)
  273.  
  274. #define xRGB256(a, b, c) {gxRGBSpace,nil,{(a << 8)+a,(b << 8)+b,(c << 8)+c, 0 }}
  275.  
  276. #define xRGB(a, b, c) {gxRGBSpace,nil,{a,b,c,0}}
  277.  
  278. #define xCMYK(a, b, c, d) {gxCMYKSpace,nil,{a,b,c,d}}
  279.  
  280. #define xHSV(a, b, c) {gxHSVSpace,nil,{a,b,c,0}}
  281.  
  282. #define xCIE(a, b, c) {gxCIESpace,nil,{a,b,c,0}}
  283.  
  284. #define xYIQ(a, b, c) {gxYIQSpace,nil,{a,b,c,0}}
  285.  
  286. #define xXYZ(a, b, c) {gxXYZSpace,nil,{a,b,c,0}}
  287.  
  288. #define xLUV(a, b, c) {gxLUVSpace,nil,{a,b,c,0}}
  289.  
  290. #define xLAB(a, b, c) {gxLABSpace,nil,{a,b,c,0}}
  291.  
  292. #define xHLS(a, b, c) {gxHLSSpace,nil,{a,b,c,0}}
  293.  
  294. #define xNTSC(a, b, c) {gxNTSCSpace,nil,{a,b,c,0}}
  295.  
  296. #define xPAL(a, b, c) {gxPALSpace,nil,{a,b,c,0}}
  297.  
  298. #define xGRAY(a) {gxGraySpace,nil,{a,0,0,0}}
  299.  
  300. #define xRGB16(a, b, c) {gxRGB16Space,nil,{makeRGB16(a,b,c),0,0,0}}
  301.  
  302. #define xRGB32(a, b, c) {gxRGB32Space,nil,{(a >> 8),((c >> 8) + (b >> 8) << 8),0,0}}
  303.  
  304. #define xCMYK32(a, b, c, d) {gxCMYK32Space,nil,{((b >> 8) + (a >> 8) << 8),((d >> 8) + (c >> 8) << 8),0,0}}
  305.  
  306. #define sRGB(r, g, b) {r,g,b,0}
  307.  
  308. #define sCMYK(c, m, y, k) {c,m,y,k}
  309.  
  310. #define sRGB256(a, b, c) {(a << 8)+a,(b << 8)+b,(c << 8)+c, 0 }
  311.  
  312. enum commonFaces {
  313.     gxPlain,
  314.     gxBold                        = 1,
  315.     gxItalic                    = 2,
  316.     gxUnderline                    = 4,
  317.     gxOutline                    = 8,
  318.     gxShadow                    = 0x10,
  319.     gxCondense                    = 0x20,
  320.     gxExtend                    = 0x40,
  321.     gxLighten                    = 0x80
  322. };
  323.  
  324. typedef char commonFace;
  325.  
  326. enum commonTransferModes {
  327.     commonAddOverMode            = 2000,
  328.     commonSubtractOverMode,
  329.     commonSubtractPinMode,
  330.     commonTransparentMode,
  331.     commonInMode,
  332.     commonOutMode
  333. };
  334.  
  335. typedef short commonTransferMode;
  336.  
  337. #if defined(powerc) || defined (__powerc)
  338. #pragma options align=mac68k
  339. #endif
  340. struct cubic {
  341.     gxPoint                        a;
  342.     gxPoint                        b;
  343.     gxPoint                        c;
  344.     gxPoint                        d;
  345. };
  346. #if defined(powerc) || defined(__powerc)
  347. #pragma options align=reset
  348. #endif
  349.  
  350. #if defined(powerc) || defined (__powerc)
  351. #pragma options align=mac68k
  352. #endif
  353. struct conic {
  354.     gxPoint                        a;
  355.     gxPoint                        b;
  356.     gxPoint                        c;
  357.     Fixed                        lambda;
  358. };
  359. #if defined(powerc) || defined(__powerc)
  360. #pragma options align=reset
  361. #endif
  362.  
  363. #ifndef __cplusplus
  364. typedef struct cubic cubic;
  365.  
  366. typedef struct conic conic;
  367.  
  368. #endif
  369.  
  370. extern gxShape NewPath(const gxPath *path);
  371. extern gxShape NewPolygon(const gxPolygon *polygon);
  372. extern gxPolygon *GetPolygon(gxShape source, long contour, gxPolygon *polygon);
  373. extern gxPath *GetPath(gxShape source, long contour, gxPath *path);
  374. extern void SetPath(gxShape target, long contour, const gxPath *path);
  375. extern void SetPolygon(gxShape target, long contour, const gxPolygon *polygon);
  376. extern void DrawPolygon(const gxPolygon *polygon, gxShapeFill fill);
  377. extern void DrawPath(const gxPath *path, gxShapeFill fill);
  378. extern void SetShapeIndexPoint(gxShape target, long index, const gxPoint *point);
  379. extern void SetShapeIndexControl(gxShape target, long index, long control);
  380. extern gxPoint *GetShapeIndexPoint(gxShape source, long index, gxPoint *point);
  381. extern long GetShapeIndexControl(gxShape source, long index, long *control);
  382. extern void InsertShape(gxShape target, long index, gxShape toAdd);
  383. extern gxShape ExtractShape(gxShape source, long firstPoint, long numPoints);
  384. extern void AddToShape(gxShape target, gxShape add);
  385. extern void ExtendShape(gxShape target, gxShape add);
  386.     #ifdef debugging
  387. extern gxShape NewShape2(gxShapeType type, Fixed x, Fixed y);
  388. extern gxShape NewShape4(gxShapeType type, Fixed firstX, Fixed firstY, Fixed lastX, Fixed lastY);
  389. extern gxShape NewShape6(gxShapeType type, Fixed firstX, Fixed firstY, Fixed controlX, Fixed controlY, Fixed lastX, Fixed lastY);
  390. extern void SetShape2(gxShape target, Fixed x, Fixed y);
  391. extern void SetShape4(gxShape target, Fixed firstX, Fixed firstY, Fixed lastX, Fixed lastY);
  392. extern void SetShape6(gxShape target, Fixed firstX, Fixed firstY, Fixed controlX, Fixed controlY, Fixed lastX, Fixed lastY);
  393.     #else
  394. #define NewShape2(type, p1, p2) NewShapeMany(type, (Fixed)p1, (Fixed)p2)
  395.  
  396. #define NewShape4(type, p1, p2, p3, p4) NewShapeMany(type, (Fixed)p1, (Fixed)p2, (Fixed)p3, (Fixed)p4)
  397.  
  398. #define NewShape6(type, p1, p2, p3, p4, p5, p6) NewShapeMany(type, (Fixed)p1, (Fixed)p2, (Fixed)p3, (Fixed)p4, (Fixed)p5, (Fixed)p6)
  399.  
  400. #define SetShape2(source, p1, p2) SetShapeMany(source, (Fixed)p1, (Fixed)p2)
  401.  
  402. #define SetShape4(source, p1, p2, p3, p4) SetShapeMany(source, (Fixed)p1, (Fixed)p2, (Fixed)p3, (Fixed)p4)
  403.  
  404. #define SetShape6(source, p1, p2, p3, p4, p5, p6) SetShapeMany(source, (Fixed)p1, (Fixed)p2, (Fixed)p3, (Fixed)p4, (Fixed)p5, (Fixed)p6)
  405.  
  406.     #endif
  407.  
  408. extern gxShape NewShapeMany(gxShapeType type, Fixed firstArg, ...);
  409. extern void SetShapeMany(gxShape target, Fixed firstArg, ...);
  410. extern gxShape GetBitmapPartsFromFixedBounds(gxShape source, const gxRectangle *bounds);
  411. extern void SetBitmapPartsFromFixedBounds(gxShape target, const gxRectangle *bounds, gxShape bitmapShape);
  412. extern gxShape NewArc(const gxRectangle *rect, Fixed startAng, Fixed sweep, boolean wedge);
  413. extern gxShape NewOval(const gxRectangle *rect);
  414. extern gxShape NewRoundRect(const gxRectangle *rect, const gxPoint *ovalSize);
  415. extern gxShape NewCubic(const cubic *curve);
  416. extern gxShape NewConic(const conic *curve);
  417. extern void DrawArc(const gxRectangle *rect, Fixed startAng, Fixed sweep, boolean wedge);
  418. extern void DrawOval(const gxRectangle *rect, gxShapeFill fill);
  419. extern void DrawRoundRect(const gxRectangle *rect, const gxPoint *ovalSize, gxShapeFill fill);
  420. extern void DrawCubic(const cubic *curve, gxShapeFill fill);
  421. extern void DrawConic(const conic *curve, gxShapeFill fill);
  422. extern void SetArc(gxShape target, const gxRectangle *rect, Fixed startAng, Fixed sweep, boolean wedge);
  423. extern void SetOval(gxShape target, const gxRectangle *rect);
  424. extern void SetRoundRect(gxShape target, const gxRectangle *rect, const gxPoint *ovalSize);
  425. extern void SetCubic(gxShape target, const cubic *curve);
  426. extern void SetConic(gxShape target, const conic *curve);
  427. extern void SetGraphicsLibraryErrors(void);
  428. extern void SetGraphicsLibraryNotices(void);
  429. extern char *GraphicsErrorMessage(gxGraphicsError error);
  430. extern char *GraphicsWarningMessage(gxGraphicsWarning warning);
  431. extern char *GraphicsNoticeMessage(gxGraphicsNotice notice);
  432. extern void DisplayGraphicsErrorMessage(gxGraphicsError error, long reference);
  433. extern void DisplayGraphicsWarningMessage(gxGraphicsWarning warning, long reference);
  434. extern void DisplayGraphicsNoticeMessage(gxGraphicsNotice notice, long reference);
  435. extern void CenterShape(gxShape target, gxRectangle *rect);
  436. extern void MoveShapeCenterTo(gxShape target, Fixed x, Fixed y);
  437. extern void RotateShapeAboutCenter(gxShape target, Fixed degrees);
  438. extern void SkewShapeAboutCenter(gxShape target, Fixed xSkew, Fixed ySkew);
  439. extern void ScaleShapeAboutCenter(gxShape target, Fixed hScale, Fixed vScale);
  440. extern void MapShapeToSpace(gxShape target, gxViewPort port, gxViewDevice device);
  441. extern void MapShapeFromSpace(gxShape target, gxViewPort port, gxViewDevice device);
  442. extern void MapPointToSpace(gxPoint *target, gxViewPort port, gxViewDevice device);
  443. extern void MapPointFromSpace(gxPoint *target, gxViewPort port, gxViewDevice device);
  444. extern gxViewPort GetTransformViewPort(gxTransform source);
  445. extern void SetTransformViewPort(gxTransform target, gxViewPort port);
  446. extern void AddToTransformViewPort(gxTransform target, gxViewPort port);
  447. extern void SetShapeViewPort(gxShape target, gxViewPort port);
  448. extern gxViewPort GetShapeViewPort(gxShape source);
  449. extern void SetDeepShapeViewPort(gxShape target, gxViewPort port);
  450. extern void SetDeepShapeViewPorts(gxShape target, long count, const gxViewPort portList[]);
  451. extern void SetDeepShapeTransform(gxShape target, gxTransform);
  452. extern void SetDefaultViewPort(gxViewPort port);
  453. extern gxViewGroup CopyViewGroup(gxViewGroup group);
  454. extern gxTransform ChangeTransformViewGroup(gxTransform target, gxViewGroup oldGroup, gxViewGroup newGroup);
  455. extern gxShape ChangeShapeViewGroup(gxShape source, gxViewGroup oldGroup, gxViewGroup newGroup);
  456. extern gxTransform SeparateShapeTransform(gxShape source);
  457. extern void ReuniteShapeTransform(gxShape target, gxTransform separate);
  458. extern gxStyle SeparateShapeStyle(gxShape source);
  459. extern void ReuniteShapeStyle(gxShape target, gxStyle separate);
  460. extern gxInk SeparateShapeInk(gxShape source);
  461. extern void ReuniteShapeInk(gxShape target, gxInk separate);
  462. extern void GetPathsIndexPointControl(const gxPaths *source, long index, gxPoint **pt, long **controlPtr, long *controlMask);
  463. extern void SetShapeOpenPath(gxShape target);
  464. extern void PreMapTransform(gxTransform source, gxMapping *map);
  465. #define CopyShape(s) GXCopyToShape(nil,s)
  466.  
  467. #define CopyStyle(s) GXCopyToStyle(nil,s)
  468.  
  469. #define CopyInk(s) GXCopyToInk(nil,s)
  470.  
  471. #define CopyTransform(s) GXCopyToTransform(nil,s)
  472.  
  473. extern void DisposeTransformAt(gxTransform *target);
  474. extern void DisposeShapeAt(gxShape *target);
  475. extern void DisposeStyleAt(gxStyle *target);
  476. extern void DisposeInkAt(gxInk *target);
  477. extern void DisposeTagAt(gxTag *target);
  478. extern gxColorProfile CreateQMSColorProfile(void);
  479. extern gxColorProfile CreateCanonColorProfile(void);
  480. extern gxColorProfile CreateColorSyncSystemProfile(void);
  481. extern void InitCommonColors(void);
  482. extern void DisposeCommonColors(void);
  483. extern void SetShapeRGB(gxShape target, gxColorValue red, gxColorValue green, gxColorValue blue);
  484. extern void SetInkRGB(gxInk target, gxColorValue red, gxColorValue green, gxColorValue blue);
  485. extern void SetShapeHSV(gxShape target, gxColorValue hue, gxColorValue saturation, gxColorValue value);
  486. extern void SetInkHSV(gxInk target, gxColorValue hue, gxColorValue saturation, gxColorValue value);
  487. extern void SetShapeGray(gxShape target, gxColorValue gray);
  488. extern void SetInkGray(gxInk target, gxColorValue gray);
  489. extern void SetShapeCommonTransfer(gxShape target, commonTransferMode mode);
  490. extern void SetShapeCommonColor(gxShape target, commonColor color);
  491. extern void SetShapeCommonFace(gxShape target, commonFace face);
  492. extern void SetInkCommonTransfer(gxInk target, commonTransferMode mode);
  493. extern void SetInkCommonColor(gxInk target, commonColor);
  494. extern void SetStyleCommonFace(gxStyle target, commonFace);
  495. extern commonTransferMode GetInkCommonTransfer(gxInk source);
  496. extern commonColor GetInkCommonColor(gxInk source);
  497. extern commonFace GetStyleCommonFace(gxStyle source);
  498. extern commonTransferMode GetShapeCommonTransfer(gxShape source);
  499. extern commonColor GetShapeCommonColor(gxShape source);
  500. extern commonFace GetShapeCommonFace(gxShape source);
  501. extern gxColor *SetCommonColor(gxColor *target, commonColor color);
  502. extern commonColor GetCommonColor(const gxColor *source);
  503. extern gxColorSpace GetShapeColorSpace(gxShape target);
  504. extern gxColorProfile GetShapeColorProfile(gxShape source);
  505. extern gxColorSet GetShapeColorSet(gxShape source);
  506. extern gxColorSpace GetInkColorSpace(gxInk target);
  507. extern gxColorProfile GetInkColorProfile(gxInk source);
  508. extern gxColorSet GetInkColorSet(gxInk source);
  509. extern void SetShapeColorSpace(gxShape target, gxColorSpace space);
  510. extern void SetShapeColorProfile(gxShape target, gxColorProfile profile);
  511. extern void SetShapeColorSet(gxShape target, gxColorSet set);
  512. extern void SetInkColorSpace(gxInk target, gxColorSpace space);
  513. extern void SetInkColorProfile(gxInk target, gxColorProfile profile);
  514. extern void SetInkColorSet(gxInk target, gxColorSet set);
  515. extern gxColorSet GetViewDeviceColorSet(gxViewDevice source);
  516. extern void SetViewDeviceColorSet(gxViewDevice target, gxColorSet set);
  517. extern gxColorProfile GetViewDeviceColorProfile(gxViewDevice source);
  518. extern void SetViewDeviceColorProfile(gxViewDevice target, gxColorProfile profile);
  519. extern long GetColorSpaceComponents(gxColorSpace space);
  520. extern void InitTransferMode(gxTransferMode *mode);
  521. extern gxTransferMode *SetCommonTransfer(gxTransferMode *transferModeRecord, commonTransferMode mode, unsigned short opValue, const gxColor *opColor);
  522. extern gxColor *TransmogrifyColor(gxColor *dstColor, const gxColor *srcColor, const gxTransferMode *);
  523. extern void SetInkFastXorTransfer(gxInk inky, gxViewDevice destDevice, gxViewPort destViewPort, gxColor *background, gxColor *result);
  524. extern void SetShapeFastXorTransfer(gxShape source, gxColor *background, gxColor *result);
  525. extern gxShape NewCString(const char *cString, const gxPoint *position);
  526. extern gxShape NewPString(const char *pascalString, const gxPoint *position);
  527. extern gxShape NewChar(const char theChar, const gxPoint *position);
  528. extern void SetCString(gxShape target, const char *cString, const gxPoint *position);
  529. extern void SetPString(gxShape target, const char *pascalString, const gxPoint *position);
  530. extern void SetChar(gxShape target, const char theChar, const gxPoint *position);
  531. extern void DrawCString(const char *cString, const gxPoint *position);
  532. extern void DrawPString(const char *pascalString, const gxPoint *position);
  533. extern void gDrawChar(const char theChar, const gxPoint *position);
  534. extern Fixed FixTextWidth(const unsigned char *string, short length);
  535. extern Fixed FixCStringWidth(const char *string);
  536. extern Fixed FixPStringWidth(const char *string);
  537. extern Fixed FixCharWidth(char ch);
  538. extern gxPoint *GetShapeAdvance(gxShape target, gxPoint *advance);
  539. extern void SetGlyphText(gxShape target, const unsigned char *text, long length);
  540. extern void SetGlyphAdvance(gxShape target, const long advanceBits[]);
  541. extern void SetGlyphStyles(gxShape target, const short styleRuns[], const gxStyle glyphStyles[]);
  542. extern long GetGlyphText(gxShape source, unsigned char *text);
  543. extern long GetGlyphAdvance(gxShape source, long advanceBits[]);
  544. extern long GetGlyphStyles(gxShape source, short styleRuns[], gxStyle glyphStyles[]);
  545. extern void PolyToPolyMap(const gxPolygon *source, const gxPolygon *dest, gxMapping *mapping);
  546. extern void PaintRectangle(const gxRectangle *source, commonColor color);
  547. extern void PaintRectangle2(const gxPoint *leftTop, const gxPoint *rightBottom, commonColor color);
  548. extern void PaintRectangle4(long left, long top, long right, long bottom, commonColor color);
  549. extern void AddToPicture(gxShape picture, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform);
  550. extern void InsertPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform);
  551. extern gxShape GetPictureItem(gxShape picture, long index, gxShape *destShape, gxStyle *destStyle, gxInk *destInk, gxTransform *destTransform);
  552. extern void SetPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform);
  553. extern void AddShapeUser(gxShape target, const void *data, long length, long type);
  554. extern long GetShapeUser(gxShape source, void *data, long *length, long requestedType, long *foundType, long index);
  555. extern void RemoveShapeUser(gxShape target, long type, long index);
  556. extern gxShape NewRamp(const gxColor *firstColor, const gxColor *lastColor, long steps, const gxRectangle *bounds);
  557. extern void DrawRamp(const gxColor *firstColor, const gxColor *lastColor, long steps, const gxRectangle *bounds);
  558. extern gxShape NewCommonRamp(commonColor firstColor, commonColor lastColor, long steps, const gxRectangle *bounds);
  559. extern void DrawCommonRamp(commonColor firstColor, commonColor lastColor, long steps, const gxRectangle *bounds);
  560. #define circleSlack ((fract)0x3504f334)
  561.  
  562. enum  {
  563.     openSpline,
  564.     closedSpline
  565. };
  566.  
  567. extern gxShape MirrorSpline(long count, gxPoint *points, fract slack, boolean closed);
  568. extern void OutsetShape(gxShape source, Fixed distance);
  569. extern void FrameShape(gxShape source, Fixed distance);
  570.     #ifdef __cplusplus
  571. }
  572.     #endif
  573.  
  574. #endif
  575.  
  576.